using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class u1000_manager2Map : EntityTypeConfiguration<u1000_manager2>
    {
        public u1000_manager2Map()
        {
            // Primary Key
            this.HasKey(t => t.d_w_care_manager_id);

            // Properties
            this.Property(t => t.care_manager_cd)
                .HasMaxLength(20);

            this.Property(t => t.care_manager_name)
                .HasMaxLength(50);

            this.Property(t => t.gender)
                .HasMaxLength(20);

            this.Property(t => t.source_id)
                .HasMaxLength(20);

            this.Property(t => t.reserv_1)
                .HasMaxLength(20);

            this.Property(t => t.reserv_2)
                .HasMaxLength(20);

            this.Property(t => t.reserv_3)
                .HasMaxLength(20);

            this.Property(t => t.reserv_4)
                .HasMaxLength(20);

            this.Property(t => t.reserv_5)
                .HasMaxLength(20);

            this.Property(t => t.id_card)
                .HasMaxLength(20);

            this.Property(t => t.post_code)
                .HasMaxLength(6);

            this.Property(t => t.section_office)
                .HasMaxLength(50);

            this.Property(t => t.office_phone)
                .HasMaxLength(50);

            this.Property(t => t.title)
                .HasMaxLength(50);

            this.Property(t => t.mobile_phone)
                .HasMaxLength(20);

            this.Property(t => t.personal_website)
                .HasMaxLength(100);

            this.Property(t => t.doctor_desc)
                .HasMaxLength(500);

            this.Property(t => t.email)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("u1000_manager2");
            this.Property(t => t.d_w_care_manager_id).HasColumnName("d_w_care_manager_id");
            this.Property(t => t.care_manager_cd).HasColumnName("care_manager_cd");
            this.Property(t => t.care_manager_name).HasColumnName("care_manager_name");
            this.Property(t => t.gender).HasColumnName("gender");
            this.Property(t => t.business_load_dt).HasColumnName("business_load_dt");
            this.Property(t => t.data_load_dt).HasColumnName("data_load_dt");
            this.Property(t => t.effective_start_dt).HasColumnName("effective_start_dt");
            this.Property(t => t.effective_end_dt).HasColumnName("effective_end_dt");
            this.Property(t => t.source_id).HasColumnName("source_id");
            this.Property(t => t.reserv_1).HasColumnName("reserv_1");
            this.Property(t => t.reserv_2).HasColumnName("reserv_2");
            this.Property(t => t.reserv_3).HasColumnName("reserv_3");
            this.Property(t => t.reserv_4).HasColumnName("reserv_4");
            this.Property(t => t.reserv_5).HasColumnName("reserv_5");
            this.Property(t => t.id_card).HasColumnName("id_card");
            this.Property(t => t.birthday).HasColumnName("birthday");
            this.Property(t => t.post_code).HasColumnName("post_code");
            this.Property(t => t.section_office).HasColumnName("section_office");
            this.Property(t => t.office_phone).HasColumnName("office_phone");
            this.Property(t => t.title).HasColumnName("title");
            this.Property(t => t.mobile_phone).HasColumnName("mobile_phone");
            this.Property(t => t.personal_website).HasColumnName("personal_website");
            this.Property(t => t.doctor_desc).HasColumnName("doctor_desc");
            this.Property(t => t.status).HasColumnName("status");
            this.Property(t => t.node_cd).HasColumnName("node_cd");
            this.Property(t => t.email).HasColumnName("email");
        }
    }
}
